<%@ page language="java"%>
<HTML>
<head>
<script>
function onSelect() {
	var file = document.getElementById("fileString").value;
	document.getElementById("filePath").value = file;
	console.log(file);
}
</script>
<body>
<FORM ENCTYPE="multipart/form-data" ACTION="page2.jsp" METHOD=get>
	<input type="file" name="FILE_NAME" size="35" id="fileString"
		onchange="onSelect()"> <input type="text" name="file_path"
		size="100" id="filePath">
</FORM>
</body>

</head>
</HTML>